﻿
namespace Needle.Core.Lifetime
{
    /// <summary></summary>
    public class NoTrackingAtrribute : TrackingPolicyAttribute
    {

        private static readonly IReference reference = new NullReference();
        /// <summary></summary>
        public override IReference Apply(object instance)
        {
            return reference; 
        }

        private class NullReference : IReference
        {
            #region IReference Members

            public object Target
            {
                get { return null; }
            }

            public bool IsValid
            {
                get { return false; }
            }

            #endregion
        }
    }
}
